# -*- ecoding: utf-8 -*-
# @Author: Wick
# @Time: 2024-02-22 3:50

num = 123
print(bin(num))
counter = 0
while num:
    if num&1:
        counter += 1
    num = num >> 1
print(counter)